﻿@model LayoutCategory
@{
    var formId = "frmAddCategory";
    var submitTitle = "הוסף";
    if (Model != null)
    {
        formId = "frmUpdateCategory";
        submitTitle = "עדכן";
    }
}
@using (Html.BeginForm("AddCategory", "PageLayouts", FormMethod.Post, new { id = formId }))
{
    if (Model != null)
    {
        @Html.HiddenFor(m => m.LayoutCategoryId)
    }
    <div class="fieldRow">
        <div class="label">
            שם בעברית</div>
        <div class="value">
            @Html.TextBoxFor(m => m.TitleHebrew)
            @Html.ValidationMessageFor(m => m.TitleHebrew)
        </div>
    </div>
    <div class="fieldRow">
        <div class="label">
            שם באנגלית</div>
        <div class="value">
            @Html.TextBoxFor(m => m.Title)
            @Html.ValidationMessageFor(m => m.Title)
        </div>
    </div>
    <div class="fieldRow">
        <div class="label">
            &nbsp;</div>
        <div class="value">
            <input type="submit" value="@submitTitle" class="button" /></div>
    </div>
}